
module.exports = {
  mode: 'universal',
  /*
  ** Headers of the page
  */
  env: {
    NODE_ENV: process.env.NODE_ENV,
    baseUrl: process.env.NODE_ENV === 'production' ? 'pro' : 'http://47.105.155.110:3000/'
  },
  head: {
    //script: [{ innerHTML: require('./plugins/js/flexible'), type: 'text/javascript', charset: 'utf-8'}],
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#fff' },
  /*
  ** Global CSS
  */

  css: [
    'assets/main.css',

  ],
  /*
  ** Plugins to load before mounting the App
  */
  router: {
    middleware: 'i18n'
  },
  plugins: [
    '~/plugins/i18n.js',
    '~plugins/vant',
    {
      src: '~plugins/flexible.js', ssr: false
    }

  ],
  /*
  ** Nuxt.js dev-modules
  */
  devModules: [
  ],
  /*
  ** Nuxt.js modules
  */
  modules: [
    // Doc: https://axios.nuxtjs.org/usage

    '@nuxtjs/axios',
  ],
  /*
  ** Build configuration
  */
  build: {
    postcss: [
      require('postcss-pxtorem')({
        rootValue: 37.5,
        "propList": [
          "*"
        ]
      }),

    ],
    extractCSS: { allChunks: true },
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {
    }
  }
}
